home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
STANDALO
/
SPROING!
/
SPROING_.C1
< prev
next >
Wrap
Text File
|
1990-10-27
|
1KB
|
61 lines
/*_________________________________________________________________________
Sproing VBL Tester
October 1990
⌐1990 Scott Armitage
Written for Think C
This application will install the Sproing VBL task and run it until
the mouse is clicked. This lets us experiment with the dynamics of
the vbl without the arduous task of running an INIT.
The Sproing VBL should be compiled and merged with the
"Sproing Tester.rsrc" file prior to running this application.
_________________________________________________________________________*/
#include "VRetraceMgr.h"
extern Point MouseOffset : 0x8DA;
/*_____________________________________________________________________*/
main()
{
Handle ourCode;
VBLQElPtr vblPtr;
InitGraf(&thePort); /* init the toolbox */
InitFonts();
InitWindows();
InitMenus();
TEInit();
InitDialogs(0);
InitCursor();
ourCode = GetResource('vbl ', 999); /* load the VBL */
HLock(ourCode);
vblPtr = (VBLQElPtr) NewPtr(sizeof(VBLTask)); /* make our VBL task */
if (vblPtr == 0) {
SysBeep(5);
ExitToShell();
}
vblPtr->qType = vType;
vblPtr->vblAddr = (ProcPtr) *ourCode;
vblPtr->vblCount = 1;
vblPtr->vblPhase = 0;
if (VInstall(vblPtr)!= 0) /* install it */
DebugStr("\pNo Install");
while(!Button()) /* wait for click */
;
VRemove(vblPtr); /* remove the vbl task */
MouseOffset.h = 0; /* restore the mouse offsets */
MouseOffset.v = 0;
}